home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / asm / demos / retinarave / include / lineclear.i < prev    next >
Text File  |  1980-01-03  |  3KB  |  92 lines

  1. ;***********************screen wipe********************************
  2. ; Each time routine is called from the interupt one line is removed
  3. ; from top and bottom of picture until screen is clr completely.
  4. ;******************************************************************
  5. ;at start of prg load variables as shown below :-
  6. ;
  7. ;    lea endpic,a0
  8. ;    move.l a0,scnend
  9. ;calc for following command 
  10. ;    (screen width bytes)*(No. of Bitplanes)*(2 lines)
  11. ;    sub.l #40*4*2,a0
  12. ;    move.l a0,line2    
  13. ;screen is immediate val. if picture is incbin + colourmap 
  14. ;    move.l #screen,d0
  15. ;    move.l d0,scnsrt
  16. ;    move.l d0,line
  17. ;otherwise do this.
  18. ;    lea screen,a0
  19. ;    move.l a0,scnsrt
  20. ;    move.l a0,line
  21. ;
  22. ;******************************************************************
  23. ; in interupt put
  24. ;
  25. ;     tst.w done
  26. ;    beq lclear
  27. ;    bsr LINECLR
  28. ;lclear:
  29. ;******************************************************************
  30. ; variables                           size
  31. ;     scnend = address of end of screen        dc.l 0
  32. ;       scnsrt = address of start of screen        dc.l 0
  33. ;    line   = address of start of screen        dc.l 0
  34. ;    line2  = address of end of screen less 2 lines    dc.l 0
  35. ;    done   = toggles to zero val once clear done    dc.w 0
  36. ;******************************************************************
  37. ;To start routine simply enter the following cmd.
  38. ;
  39. ;    eor.w #$FFFF,done
  40. ;
  41. ;to re-use command just reset the variables and use the command above
  42. ;
  43. ;BEFORE RELOADING VARIABLES YOU MUST CHECK ROUTINE IS NOT 1/2 WAY 
  44. ;THROUGH WITH
  45. ;
  46. ;in_progress:
  47. ;    TST.w done
  48. ;    bne in_progress
  49. ;******************************************************************
  50.  
  51. LINECLR:
  52.     move.l line,a0
  53.     move.l scnend,a1
  54.     cmp.l a0,a1
  55.     bmi downdone
  56.     
  57.     bsr wblit
  58.     move.l #$ffffffff,BLTAFWM+Custom
  59.     move.w #$0,BLTDMOD+Custom
  60.     move.l a0,BLTDPT+Custom
  61.     move.w #0,BLTAdat+Custom
  62.     move.w #%0000000111110000,BLTCON0+Custom
  63.     move.w #0,BLTCON1+Custom
  64.     move.w #(64*4)+20,BLTSIZE+Custom    16lines by 20 words
  65. ; change this value    ^^ to your scrn width
  66. ; and this value    ^ to No. bitplanes in picture.    
  67.     add.l #40*4*2,a0
  68.     move.l a0,line
  69. ; add rts here for wipe to go down then up
  70. downdone:    
  71.     move.l line2,a0
  72.     move.l scnsrt,a1
  73.     cmp.l a0,a1
  74.     bpl updone
  75.     
  76.     bsr wblit
  77.     move.l #$ffffffff,BLTAFWM+Custom
  78.     move.w #$0,BLTDMOD+Custom
  79.     move.l a0,BLTDPT+Custom
  80.     move.w #0,BLTAdat+Custom
  81.     move.w #%0000000111110000,BLTCON0+Custom
  82.     move.w #0,BLTCON1+Custom
  83.     move.w #(64*4)+20,BLTSIZE+Custom    16lines by 20 words
  84. ; change this value    ^^ to your scrn width
  85. ; and this value    ^ to No. bitplanes in picture.    
  86.     sub.l #40*4*2,a0
  87.     move.l a0,line2
  88.     rts
  89. updone
  90.     eor.w #$ffff,done
  91.     rts
  92.